package com.myproject.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("jdbc")
public class JdbcController {

    private static final Logger logger = LoggerFactory.getLogger(JdbcController.class);


    @PostMapping("/select")
    public String method(@RequestBody String name){

        logger.info("controller method");

        return "hello";
    }

    @PostMapping("/test")
    public String method2(HttpServletRequest request){

        System.out.println(request.getClass().getName());
        logger.info("controller method");

        return "hello";
    }





}
